home *** CD-ROM | disk | FTP | other *** search
/ Wayzata's Best of Shareware PC/Windows 2 / Wayzata's Best of Shareware 2.0 (Windows) (Wayzata Technology)(7112)(1994).bin / pc / dos / programg / decgif3 / x360x480.asm < prev    next >
Assembly Source File  |  1992-07-17  |  2KB  |  94 lines

  1. ;*******************************************************************************
  2. ;* Assembly Subroutines For DECGIF3.BAS 
  3. ;* By Rich Geldreich 1992
  4. ;* Assembled with TASM v2.00
  5. ;*
  6. ;* Procedure to set the VGA into the 360x480x256 mode. From Michael Abrash's
  7. ;* "Power Graphics Programming".
  8. ;* 
  9. ;*
  10. .286
  11. Ideal
  12. Model Small
  13.  
  14. Public X360x480
  15.  
  16. CodeSeg
  17.  
  18. vptbl       dw 06b00h
  19.             dw 05901h
  20.  
  21.             dw 05a02h
  22.             dw 08e03h
  23.  
  24.             dw 05e04h
  25.             dw 08a05h
  26.  
  27.             dw 00d06h
  28.             dw 03e07h
  29.  
  30.             dw 04009h
  31.             dw 0ea10h
  32.  
  33.             dw 0ac11h
  34.             dw 0df12h
  35.  
  36.             dw 02d13h
  37.             dw 00014h
  38.  
  39.             dw 0e715h
  40.             dw 00616h
  41.  
  42.             dw 0e317h
  43.  
  44. label vpend word
  45.  
  46.  
  47. Proc    X360x480
  48.         Push    ds si 
  49.         
  50.         Mov     ax, cs
  51.         Mov     ds, ax
  52.         
  53.         mov     ax, 012h
  54.         int     10h
  55.         mov     ax, 013h
  56.         int     10h
  57.  
  58.         mov     dx, 3c4h
  59.         mov     ax, 0604h
  60.         out     dx, ax
  61.  
  62.         mov     ax, 0100h
  63.         out     dx, ax
  64.  
  65.         mov     dx, 3c2h
  66.         mov     al, 0e7h
  67.         out     dx, al
  68.    
  69.         mov     dx, 3c4h
  70.         mov     ax, 0300h
  71.         out     dx, ax
  72.  
  73.         mov     dx, 3d4h
  74.  
  75.         mov     al, 11h
  76.         out     dx, al
  77.         inc     dx
  78.         in      al, dx
  79.         and     al, 7fh
  80.         out     dx, al
  81.         dec     dx
  82.         cld
  83.         mov     si, offset vptbl
  84.         mov     cx, 17
  85. @@10:
  86.         lods    [word ds:si]
  87.         out     dx, ax
  88.         loop    @@10
  89.         Pop     si ds    
  90.         retf    0
  91. endp    X360x480
  92. end
  93.  
  94.